<!DOCTYPE html>
<html class="no-js" lang="">

<head>#include( "/public-head.html")
</head>

<body style="background-color: #ffffff !important;">
	<div class="main-content checkbo">
		<div class="panel mb25">
			<div class="panel-heading border">#if($!starring.starringId) 编辑#else 添加#end角色</div>
			<div class="panel-body">
				<div class="row no-margin">
					<div class="col-lg-12">
						<form action="/vrs/starring/edit.jsn" method="post" id="starringForm" name="ajaxForm"
							class="form-horizontal bordered-group" starring="form">
							<input type="hidden" name="starring.starringId" value="$!{starring.starringId}">
							<div class="form-group">
								<label class="col-sm-2 control-label">名称</label>
								<div class="col-sm-10">
									<input type="text" name="starring.name" value="$!{starring.name}" class="form-control w150" placeholder="艺人名称">
								</div>
							</div>
							<textarea id="standardPic" name="starring.standardPic" rows="5" cols="100" class="hidden">$!{starring.standardPic}</textarea>
							<div class="form-group">
	                            <label class="col-sm-2 control-label">配图</label>
	                            <div id="picDiv" class="col-sm-10" data-theme-name="upload-image">
	
	                                <div  data-theme-name="upload-image-div" class="pull-left" >
	                                    <div class="pull-left mr10">
	                                        <select data-placeholder="请选择终端" required data-theme-name="terminal"  class="chosen w100" >
	                                            <option value=""></option>
	                                            <option value="3">Mobile</option>
	                                            <option value="1">TV&OTT</option>
	                                            <option value="2">PC</option>
	                                            <option value="4">pad</option>
	                                        </select><br/>
	                                        <button type="button" class="btn btn-danger" data-theme-name="remove-upload-image" >删除</button>
	                                    </div>
	                                    <div class="pull-left mr10">
	                                        <label data-theme-name="upload-image-label">
	                                            <img src="/images/upload_1242x416.jpg" name="" data-theme-name="view-image" width="248" height="82">
	                                            <img src="/images/wait.gif" width="40" height="40" data-theme-name="wait-image" >
	                                            <input type="file" name="image"  />
	                                            <input name="root" value="album" style="display: none"  />
	                                        </label>
	                                    </div>
                                </div>
                                <div class="pull-left mr10">
                                    <button type="button" class="btn btn-primary" data-theme-name="add-upload-image" >添<br/>加</button>
                                </div>
                            </div>
                        </div>
							<div class="form-group">
								<label></label>
								<div>
									<button type="button" onclick="submitPerForm()" class="btn btn-primary mr10">#if($!starring.starringId) 修改#else 保存#end</button>
									<button class="btn btn-default">返回</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>


	</div>
	<!-- /main area -->

	#include( "/public-script.html") 
	#include( "/sub-script.html")
	<script>
		 //配图
	    initEditPic('picDiv','$!{starring.standardPic}')
		//提交
		function submitPerForm() {
			if (!$('#starringForm').valid()) {
				return false;
			} else {
				$('#starringForm').submit();
			}
		}
	</script>
</body>

</html>
